import request from '@/utils/request'

/**
 * 轮播图分页查询
 * @param {查询条件} data
 */
export function listLayBanner(query) {
  return request({
    url: 'business/LayBanner/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增轮播图
 * @param data
 */
export function addLayBanner(data) {
  return request({
    url: 'business/LayBanner',
    method: 'post',
    data: data,
  })
}
/**
 * 修改轮播图
 * @param data
 */
export function updateLayBanner(data) {
  return request({
    url: 'business/LayBanner',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取轮播图详情
 * @param {Id}
 */
export function getLayBanner(id) {
  return request({
    url: 'business/LayBanner/' + id,
    method: 'get'
  })
}

/**
 * 删除轮播图
 * @param {主键} pid
 */
export function delLayBanner(pid) {
  return request({
    url: 'business/LayBanner/delete/' + pid,
    method: 'POST'
  })
}
